#!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2023/1/25 9:49
# @Author : caoshi
# @Version：V1.0
# @File : snake.py
# @desc : 贪吃蛇游戏

import pygame

pygame.init()

# 宽高
W = 800
H = 600

# 行和列
ROW = 6
COL = 8

size = (W, H)

# 设置窗口大小
window = pygame.display.set_mode(size)
pygame.display.set_caption("贪吃蛇")

# 是否退出
clock = pygame.time.Clock()
quit = True
while quit:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            quit = False
        pass

    # 渲染
    pygame.draw.rect(window, (255, 255, 255), (0, 0, W, H))

    pygame.display.flip()

    # 设置帧频
    clock.tick(60)
